
#ifndef __MPOOL_H__
#define __MPOOL_H__

#ifdef __cplusplus
extern "C"
{
#endif

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>

    typedef struct mpool_st mpool_t;
    extern mpool_t *mpool_init(size_t size);
    extern void mpool_deinit(mpool_t **mpool);
    extern void *mpool_malloc(mpool_t *mpool, size_t size);
    extern void mpool_free(mpool_t *mpool, void *p);

    extern int8_t global_mpool_init(size_t size);
    extern void global_mpool_deinit();
    extern void *global_mpool_malloc(size_t size);
    extern void global_mpool_free(void *p);

#ifdef __cplusplus
}
#endif

#endif